package com.bascker.algorithm.base.queue;

/**
 * FIFO: first in first out
 *
 * @param <T>
 */
public interface Queue<T> extends Iterable<T> {

    void enqueue(T item);

    T dequeue();

    int size();

    boolean isEmpty();

    // -----------------------
    // Extension Function
    // -----------------------

    default boolean isNotEmpty() {
        return !isEmpty();
    }

}
